SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE [dbo].RutasUpdateCommand
(
	@ID numeric(10, 0),
	@RUTA varchar(150),
	@COMENTARIO varchar(300),
	@Original_ID numeric(10, 0),
	@Original_RUTA varchar(150),
	@IsNull_COMENTARIO Int,
	@Original_COMENTARIO varchar(300)
)
AS
	SET NOCOUNT OFF;
UPDATE [RUTAS] SET [ID] = @ID, [RUTA] = @RUTA, [COMENTARIO] = @COMENTARIO WHERE (([ID] = @Original_ID) AND ([RUTA] = @Original_RUTA) AND ((@IsNull_COMENTARIO = 1 AND [COMENTARIO] IS NULL) OR ([COMENTARIO] = @Original_COMENTARIO)));
	
SELECT ID, RUTA, COMENTARIO FROM RUTAS WHERE (ID = @ID)
GO
